package br.com.msystem.vo;
// Generated 12/03/2013 13:33:49 by Hibernate Tools 3.4.0.CR1


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Acessos generated by hbm2java
 */
@Entity
@Table(name="acessos"
    ,catalog="handy"
    , uniqueConstraints = @UniqueConstraint(columnNames={"NOME_PROGRAMA", "USUARIO_SQ"}) 
)
public class Acessos  implements java.io.Serializable {


     private int acessoSq;
     private Usuarios usuarios;
     private String nomePrograma;
     private String visualizar;
     private String criar;
     private String editar;
     private String apagar;

    public Acessos() {
    }

	
    public Acessos(Usuarios usuarios, String nomePrograma) {
        this.usuarios = usuarios;
        this.nomePrograma = nomePrograma;
    }
    public Acessos(Usuarios usuarios, String nomePrograma, String visualizar, String criar, String editar, String apagar) {
       this.usuarios = usuarios;
       this.nomePrograma = nomePrograma;
       this.visualizar = visualizar;
       this.criar = criar;
       this.editar = editar;
       this.apagar = apagar;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="ACESSO_SQ", unique=true, nullable=false)
    public int getAcessoSq() {
        return this.acessoSq;
    }
    
    public void setAcessoSq(int acessoSq) {
        this.acessoSq = acessoSq;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="USUARIO_SQ", nullable=false)
    public Usuarios getUsuarios() {
        return this.usuarios;
    }
    
    public void setUsuarios(Usuarios usuarios) {
        this.usuarios = usuarios;
    }

    
    @Column(name="NOME_PROGRAMA", nullable=false, length=100)
    public String getNomePrograma() {
        return this.nomePrograma;
    }
    
    public void setNomePrograma(String nomePrograma) {
        this.nomePrograma = nomePrograma;
    }

    
    @Column(name="VISUALIZAR", length=1)
    public String getVisualizar() {
        return this.visualizar;
    }
    
    public void setVisualizar(String visualizar) {
        this.visualizar = visualizar;
    }

    
    @Column(name="CRIAR", length=1)
    public String getCriar() {
        return this.criar;
    }
    
    public void setCriar(String criar) {
        this.criar = criar;
    }

    
    @Column(name="EDITAR", length=1)
    public String getEditar() {
        return this.editar;
    }
    
    public void setEditar(String editar) {
        this.editar = editar;
    }

    
    @Column(name="APAGAR", length=1)
    public String getApagar() {
        return this.apagar;
    }
    
    public void setApagar(String apagar) {
        this.apagar = apagar;
    }




}


